package com.nageoffer.jobtrain.project.faker;

public class RandomNicknames {
    public static String sql = "CREATE TABLE `t_contest_answer_%d` (\n" +
            "  `id` bigint(20) NOT NULL COMMENT '主键ID',\n" +
            "  `contest_id` bigint(20) DEFAULT NULL COMMENT '竞赛ID',\n" +
            "  `question_id` bigint(20) NOT NULL COMMENT 'OJ题目ID',\n" +
            "  `phone_number` varchar(20) NOT NULL COMMENT '用户手机号',\n" +
            "  `code_type` tinyint(1) NOT NULL COMMENT '代码类型；0：Java；1：C；2：C++；3：Python；4：Go',\n" +
            "  `submit_code` text COMMENT '提交的代码',\n" +
            "  `total_code` text COMMENT '用户提交总代码；submitCode + mainFunction',\n" +
            "  `pass` tinyint(1) DEFAULT NULL COMMENT '是否通过测试用例',\n" +
            "  `execute_result` varchar(2048) DEFAULT NULL COMMENT '执行结果',\n" +
            "  `execute_output_case_result` text COMMENT '执行输出测试用例结果',\n" +
            "  `percent` int(10) DEFAULT NULL COMMENT '通过测试用例百分比 - 30,50,100',\n" +
            "  `scores` int(10) DEFAULT NULL COMMENT '竞赛答题得分',\n" +
            "  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',\n" +
            "  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',\n" +
            "  `del_flag` tinyint(1) DEFAULT '0' COMMENT '删除标识',\n" +
            "  PRIMARY KEY (`id`)\n" +
            ") ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户竞赛答题表';";

    public static void main(String[] args) {
        for (int i = 0; i < 8; i++) {
            System.out.printf((sql) + "%n", i);
        }
    }
}